#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Sep  8 21:29:52 2022

@author: mac1444
"""
from scipy import optimize
import numpy as n
#res=optimize.linprog(c,A,b,Aeq,beq,bounds=(x0_bounds,x1_bounds));

c=n.array([-5,-4,-6])
A=n.array([[1,-1,1],[3,2,4],[3,2,0]])
b=n.array([20,42,30])
x1=[0,None]
x2=[0,None]
x3=[0,None]
print(optimize.linprog(c,A,b,bounds=(x1,x2,x3)))

#%%
c=np.array([-4,-3])
A=np.array([[2,1],[1,1]])
b=np.array([10,8])
x1=[0,None]
x2=[0,7]
print(optimize.linprog(c,A,b,bounds=(x1,x2)))






#%%
import matplotlib.pyplot as plt
x=np.linspace(0,10,100)
y1,y2=np.sin(x),np.cos(x)
plt.plot(x,y1)
plt.plot(x,y2)
plt.show()